<template>
    <div class="home">
        <div id="img" style="margin-bottom:20px">
            <mon-img :src="logo" alt="My vue logo" width="300px" />
        </div>
        <button @click="print" style="margin-right:10px">Print</button> 
        <button id="upload">Upload</button>

        <div>
            <mon-word value="啦啦啦，我的文字哟" color="success" />
        </div>
    </div>
</template>

<script>
import logo from "assets/logo.png";
import Print from "common/plug/Print";
import Upload from "common/plug/Upload";

export default {
    name: "home",
    data() {
        return {
            logo: logo
        };
    },
    mounted() {
        // this.$http.query({
        //     url: "http://kab.test?abc=33",
        //     data: {
        //         a: 1,
        //         b: "aasd"
        //     }
        // });
        // console.log(this.$validate.checkItem("number", "123", "啦啦啦"));
        // 绑定文件上传
        // console.log(Upload)
        let upload = new Upload({
            elem: "#upload",
            url: "",
            headers: {},
        });

        this.$toastr.send('Hello mon-util')
    },
    methods: {
        print() {
            Print(document.getElementById("img"));
            // this.$eventbus.on("list", () => {
            //     alert(123);
            // });
        }
    }
};
</script>
